<template>
  <div class="event-detail-page page">
    <nav-bar title="党员信息" theme="white"></nav-bar>
    <div class="page-main" style="margin-top: 44px">
      <van-sticky class="page-scroll" :offset-top="44">
        <van-cell
          title="所在党支部"
          :value="persondetailData.partyOrganizationName"
          title-class="van-cell__title_gray"
          value-class="van-cell__value_black"
        />
        <van-cell
          title="姓名"
          :value="persondetailData.personName"
          title-class="van-cell__title_gray"
          value-class="van-cell__value_black"
        />
        <van-cell
          title="证件类型"
          :value="persondetailData.idTypeName"
          title-class="van-cell__title_gray"
          value-class="van-cell__value_black"
        />
        <van-cell
          title="证件号码"
          :value="persondetailData.idCard"
          title-class="van-cell__title_gray"
          value-class="van-cell__value_black"
        />
        <van-cell
          title="性别"
          :value="persondetailData.sexName"
          title-class="van-cell__title_gray"
          value-class="van-cell__value_black"
        />
        <van-cell
          title="手机号"
          :value="persondetailData.phone"
          title-class="van-cell__title_gray"
          value-class="van-cell__value_black"
        />
        <van-cell
          title="出生日期"
          :value="persondetailData.birthday"
          title-class="van-cell__title_gray"
          value-class="van-cell__value_black"
        />
        <van-cell
          title="人员类别"
          :value="persondetailData.partyPersonTypeName"
          title-class="van-cell__title_gray"
          value-class="van-cell__value_black"
        />
        <van-cell
          title="学历"
          :value="persondetailData.edulevelName"
          title-class="van-cell__title_gray"
          value-class="van-cell__value_black"
        />
        <van-cell
          title="民族"
          :value="persondetailData.nationalityName"
          title-class="van-cell__title_gray"
          value-class="van-cell__value_black"
        />
        <van-cell
          title="加入党组织日期"
          :value="persondetailData.partyJoinTime"
          title-class="van-cell__title_gray"
          value-class="van-cell__value_black"
        />
        <van-cell
          title="转为正式党员日期"
          :value="persondetailData.partyRegularTime"
          title-class="van-cell__title_gray"
          value-class="van-cell__value_black"
        />
        <van-cell
          title="工作岗位"
          :value="persondetailData.workPostionName"
          title-class="van-cell__title_gray"
          value-class="van-cell__value_black"
        />
        <van-cell
          title="党籍状态"
          :value="persondetailData.partyStatusName"
          title-class="van-cell__title_gray"
          value-class="van-cell__value_black"
        />
        <van-cell
          title="是否为失联党员"
          :value="persondetailData.isLostName"
          title-class="van-cell__title_gray"
          value-class="van-cell__value_black"
        />
        <van-cell
          title="是否为流动党员"
          :value="persondetailData.isFloatingName"
          title-class="van-cell__title_gray"
          value-class="van-cell__value_black"
        />
        <van-cell
          title="现住地址"
          :value="persondetailData.address"
          title-class="van-cell__title_gray"
          value-class="van-cell__value_black"
        />
      </van-sticky>
    </div>
  </div>
</template>
<script>
import { mapState } from 'vuex'
import Cockpit from '@/api/cockpit'
export default {
  data() {
    return {
      persondetailData: {},
      formdata: {
        partyPersonCode: ''
      }
    }
  },
  computed: {
    ...mapState({
      user: state => state.userInfo
    })
  },
  created() {
    this.formdata.partyPersonCode = this.$route.query.partyPersonCode
    this.persondetail()
  },
  methods: {
    // 详情
    persondetail() {
      Cockpit.Analyse.persondetail(this.formdata).then(res => {
        this.persondetailData = res.data.data
      })
    }
  }
}
</script>
<style lang="less" scope>
@import '~@/assets/style/event/detail';
</style>
